When Compilers Are Mirrors
نویسنده
چکیده
When compilers are reflective mirrors, interesting things happen. Reflection and compilers do tantalizing similar things. Yet, in mainstream, statically typed languages the two have been only loosely coupled, and generally share very little code. In this talk I explore what happens if one sets out to overcome their separation. The first half of the talk addresses the challenge how reflection libraries can share core data structures and algorithms with the language’s compiler without having compiler internals leaking into the standard library API. It turns out that a component system based on abstract types and path-dependent types is a good tool to solve this challenge. I’ll explain how the ”multiple cake pattern” can be fruitfully applied to expose the right kind of information. The second half of the talk explores what one can do when strong, mirror-based reflection is a standard tool. In particular, the compiler itself can use reflection, leading to a particular system of low-level macros that rewrite syntax trees. One core property of these macros is that they can express staging, by rewriting a tree at one stage to code that produces the same tree at the next stage. Staging lets us implement type and abstract syntax tree reification. What’s more, staging can also be applied to the macro system itself, with the consequence that a simple low-level macro system can produce a high-level hygienic one, without any extra effort from the language or compiler. J. Noble (Ed.): ECOOP 2012, LNCS 7313, p. 1, 2012. c © Springer-Verlag Berlin Heidelberg 2012
منابع مشابه
An Analytical Model for Rare Earth Doped Fiber Lasers Consisting of High Reflectivity Mirrors
The present article is concerned with an analytical solution for some parts of rare earth doped fiber laser equations. The presented model is valid for both four and three-level fiber lasers consisting high reflectivity mirrors. A typical method to obtain initial value in the numerical solutions of fiber laser equations is shooting method, which is based on an iteration process. Whereas this st...
متن کاملCharacteristic of P-type AlAs/GaAs Bragg Mirrors Grown by MBE on (100) and (311)A Oriented Substrates
P-type GaAs/AlAs distributed Bragg mirrors have been grown using molecular beam epitaxy on (100) and (311)A GaAs substrates in a similar conditions. A comparison of I-V measurements shows that the resistance of the ungraded mirrors grown on the (311)A substrate is 35 times lower than those grown on the (100) substrate with similar structure. The effective barrier heights for both (311 )A and (1...
متن کاملبررسی اثر پوشش نانودیاکسیدتیتانیوم بر خاصیت خود تمیز شوندگی و ضد باکتریایی آینههای دندانپزشکی
Objective: Surface coating of dental mirrors using nanotechnology has been done to render them self-cleaning properties. Nano-scaled titanium dioxide particles (TiO2)show antimicrobial properties when exposed to ultra-violet (UV) light. The aim of this study was to evaluate the effect of surface coating of dental mirrors with nano titanium dioxide on their self-cleaning (from dentists’ perspe...
متن کاملCoherent Transport of Single Photon in a Quantum Super-cavity with Mirrors Composed of Λ-Type Three-level Atomic Ensembles
In this paper, we study the coherent transport of single photon in a coupled resonator waveguide (CRW) where two threelevel Λ-type atomic ensembles are embedded in two separate cavities. We show that it is possible to control the photon transmission and reflection coefficients by using classical control fields. In particular, we find that the total photon transmission and reflection are achieva...
متن کاملتهیه تصاویر در دندانپزشکی: قسمت دوم (تصاویر داخل دهانی)
In addition to the camera, other accessories such as retractors and mirrors are necessary for intraoral photography. They enable directly inaccessible subjects, to be viewed and photographed easily. Gaining adequate view, by suitable retractors and mirrors, is the most important step, requiring skill and patient cooperation to achieve successful results. Composition, visualization of the final ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2012